PI = 3.14159265358979

## MISCELLANEOUS

def Block(x, xmin, xmax):
	if x > xmin and x < xmax:
		return 1
	else:
		return 0

## GENERAL PARAMETERS

ppw = 256 # points per wavelength
MAX_Z =   6*ppw # number of the steps for coordinate
MAX_T =   5*ppw+1 # number of the steps for time
dt = 2*PI/ppw # step size for time
dz = 2*PI/ppw # step size for coordinate
THETA = 0 #PI/4 # incident angle for laser pulse

## PLASMA PARAMETERS

N_0 = 30 # overcritical parameter
NUM_SP = 1 # number of species

## SPECIE 0
MASS_0   =   1 # mass of the specie (relative to electron one)
CHARGE_0 =   1 # charge of the specie (relative to electron one, i.e. electron charge equals to +1)
MAX_P_0  = 6000 # number of the steps for momentum
dp_0 = 0.01 # step size for momentum (relative to Mc)
T_init_0 = 0.1/511 # initial temperature (relative to rest energy)
def PROFILE_0 (z):
	return Block(z, 2*ppw, 3*ppw)

## SPECIE 2
MASS_2   = 197*1835.3 # mass of the specie (relative to electron one)
CHARGE_2 =  -10 # charge of the specie (relative to electron one, i.e. electron charge equals to +1)
MAX_P_2  = 256 # number of the steps for momentum
dp_2 = 0.05/64 # step size for momentum (relative to Mc)
T_init_2 = 1/1000000 # initial temperature (relative to rest energy)
def PROFILE_2 (z):
	return Block(z, 1.1*ppw, 2*ppw)

## SPECIE 1
MASS_1   = 12*1835.3 # mass of the specie (relative to electron one)
CHARGE_1 =  -6 # charge of the specie (relative to electron one, i.e. electron charge equals to +1)
MAX_P_1  = 2000 # number of the steps for momentum
dp_1 = 0.001 # step size for momentum (relative to Mc)
T_init_1 = 1/100000 # initial temperature (relative to rest energy)
def PROFILE_1 (z):
	return Block(z, 1*ppw, 1.1*ppw);

## FIXED IONS
def FIXED_IONS_PROFILE (z):
	return PROFILE_0 (z) # profile of the fixed ions concentration distribution

## PULSE PARAMETERS

A = 5 # electromagnetic pulse amplitude
pol = 1 # ellipticity of polarization - relation Ex/Ey
pulse_slope = 1 # pulse slope: 0-trapezeidal, 1-Gauss, 2-sin squared+constant
t_rise = dt # pulse rising time (only for trapezeidal and sin squared slopes)
t_delay = 0 # 2*PI # delay before pulse appearing
t_length = 2*PI # pulse duration
source = 10; # the position of a source of an electromagnetic wave in respect to the PML-layer

def PULSE_X(t):
	return A*Block(t, t_delay, t_delay + t_length)*sin(t - t_delay) # a slope of the laser pulse
	#return A*exp(-sqr((t-t_delay)/t_length*2))*cos(t) # a slope of a laser pulse
def PULSE_Y(t):
	return 0 #A*exp(-sqr((t-t_delay)/t_length*2))*sin(t) # a slope of a laser pulse

## TEST PARTICLE PARAMETERS

NUM_PRT = 0;
MASS_PRT = MASS_1;
CHARGE_PRT = CHARGE_1;
start_point = 3*ppw;
interval = 1;

## OUTPUT PARAMETERS

output_directory_name = str(A)+'_'+str(N_0)+'_'+str(ppw) # name of an output directory

save_format = 'bin' # format of saving files (txt, bin, gzip)
save_dt = 1 # time interval of saving

save_fields = 1 # if fields saving in files is needed
save_fields_format = '' # format of saving files
save_fields_dt = 0 # time interval of saving

save_concs = 1 # if concentrations saving in files is needed
save_concs_format = '' # format of saving files
save_concs_dt = 0 # time interval of saving

save_dstr = 1 # if distribution functions storing in file is needed
save_dstr_format = '' # format of saving files
save_dstr_dt = ppw/16 # time interval of saving
